{% extends 'manage/base_manage.html' %}
{% load static %}
{% block title %}单一接口报告{% endblock %}

{% block css %}
    <link rel="stylesheet" href="{% static 'css/report/report_apis.css' %}">
{% endblock %}

{% block content %}
    <div class="content">
        <div id="test_content">
            <div id="test_list">
                <a id="title_distance" href="{% url 'atp:report_apis' %}">单一接口报告</a>
                <a id="title_distance" href="#">流程接口报告</a>
                <a id="title_distance" href="{% url 'atp:report_web' %}">Web测试报告</a>
                <a id="title_distance" href="#">App测试报告</a>
            </div>
            <h3 id="add_test_name">单一接口测试报告</h3>
            <table class="table-striped" id="table_list">
                <thead>
                <tr id="tr_title">
                    <th id="table_title_length">文件目录</th>
                </tr>
                </thead>
                <tbody>
                {% for apis in apis_list %}
                    <tr id="tr_d">
                    <td>F:\atp_case\api_case\report\{{ apis }}</td>
                {% endfor %}
                </tbody>
            </table>
            <!--分页-->
            <div id="pager">
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                        {% if apis_list.has_previous %}
                            <li>
                                <a href="?page={{ apis_list.previous_page_number }}&search_name={{ search_name }}"
                                   aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        {% endif %}

                        {% for page_index in apis_list.paginator.page_range %}
                            {% ifequal page_index  apis_list.number %}
                                <li class="active">
                                    <a style="background: cadetblue"
                                       href="?page={{ page_index }}">{{ page_index }}</a>
                                </li>
                            {% else %}
                                <li>
                                    <a href="?page={{ page_index }}">{{ page_index }}</a>
                                </li>
                            {% endifequal %}
                        {% endfor %}

                        {% if apis_list.has_next %}
                            <li>
                                <a href="?page={{ apis_list.next_page_number }}&search_name={{ search_name }}"
                                   aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>
        </div>
    </div>
{% endblock %}